package com.example.sachon;

import java.util.ArrayList;
import java.util.HashMap;

import com.example.sachon.vo.ChonInfo;
import com.example.sachon.vo.UserInfo;

public  class Const {
	 
	//public static String  SERVER_BASE_URL = "http://192.168.10.11:8080/sa_web/";
	//public static String  SERVER_IMAGE_URL = "http://192.168.10.11:8080/sa_web/sample_images/";
	
	// 추과장님 IP
	public static String  SERVER_BASE_URL = "http://auralizer.cafe24.com/sachon/";
	public static String  SERVER_IMAGE_URL = "http://auralizer.cafe24.com/upload/";

	public static final String SERVER_RESULT_SUCCESS = "SUCCESS";
	public static final String SERVER_RESULT_FAIL = "FAIL";
	private static Const _const = null;
	private UserInfo _userInfo;
	private ChonInfo _chonInfo;
	private HashMap _tab_list;
	private  Const() {
		// TODO Auto-generated constructor stub
		_userInfo = new UserInfo();
		_chonInfo = new ChonInfo();
		_tab_list= new HashMap ();
	}
	
	public static Const getInstance()
	{
		if( _const == null){
			_const = new Const();
		}
		return _const;
	}
	
	public UserInfo userInfo()
	{
		return _userInfo;
	}
	
	public ChonInfo chonInfo(){
		return _chonInfo;
	}
	
	public void addRefreshableTab(String name, IRefreshable view)
	{
		//HashMap<String, IRefreshable> map = new HashMap<String, IRefreshable>(name, view);
		_tab_list.put(name, view);
		//this._tab_list.add(map);
	}
	
	public IRefreshable getRefreshableTab(String name){
		return (IRefreshable)_tab_list.get(name);
	}
	
	

}
